/**
 *
 * © Bahadir Zeren 2011
 * bzeren@gmail.com
 * No warranties, express or implied, are made for this program.
 *
 */

package org.baatar.net.test;

import org.baatar.net.message.IRequest;

/**
 * Math operation request class.
 * 
 * @author b_zeren
 */
public class Request implements IRequest {

    private String clientInfo = null;
    private String operation = null;
    private Double a = null;
    private Double b = null;

    /**
     * Generates a math request object based on the passed parameters.
     * 
     * @param clientInfo client information to be sent to Math TCP service.
     * @param operation name of the operation to be performed on the 
     * Math TCP service.
     * @param a first parameter of the math operation to be performed.
     * @param b second parameter of the math operation to be performed.
     * 
     * @return Request generated Request object.
     */
    public Request(String clientInfo, String operation, Double a, Double b) {
        this.clientInfo = clientInfo;
        this.operation = operation;
        this.a = a;
        this.b = b;
    }

    /**
     * Information about client which is sending the request message.
     * 
     * @return String client information.
     */
    public String getClientInfo() {
        return clientInfo;
    }

    /**
     * Name of the math operation.
     * 
     * @return String name of the math operation to be performed.
     */
    public String getOperation() {
        return operation;
    }

    /**
     * First double parameter for math operation.
     * 
     * @return Double first parameter for math operation.
     */
    public Double getA() {
        return a;
    }

    /**
     * Second double parameter for math operation.
     * 
     * @return Double second parameter for math operation.
     */
    public Double getB() {
        return b;
    }
}
